<template>
  <div class="comp_point-goods-item-wrap">
    <div class="img">
      <div v-if="!isWm">
        <ImageBox :src="item.logo" :defaultImgType="2"></ImageBox>
      </div>
      <div v-else-if="isWm">
        <ImageBox :src="item.logo" :defaultImgType="3"></ImageBox>
      </div>
      <div v-else-if="isYht">
        <ImageBox :src="item.logo" :defaultImgType="4"></ImageBox>
      </div>
    </div>
    <div class="dot fs13 title">{{info.name}}</div>
    <div class="price dot">
      <img src="../../assets/images/common/home_integral.png" class="icon" alt=""><span>{{info.price}}</span>
    </div>
  </div>
</template>

<style scoped lang="scss" rel="stylesheet/scss">
  .comp_point-goods-item-wrap {
    width: 101px;
    text-align: center;
    .img {
      width: 100%;
      height: 101px;
    }
    .title {
      margin-top: 5px;
      margin-bottom: 3px;
    }
    .price {
      font-size: 12px;
      text-align: center;
      color: $orangeColor;
      .icon {
        position: relative;
        top: -1PX;
        display: inline-block;
        width: 16px;
        height: 16px;
        margin-right: 5px;
        vertical-align: middle;
      }
    }

  }
</style>

<script type="text/babel">
  /**
   * Author: Lily Jiang
   * Create Time: 2019/10/9
   * Description:
   */

  import ImageBox from '@/components/common/ImageBox.vue';
  import { mapGetters, mapActions } from "vuex";

  export default {
    name: "GoodsItem",
    components: {
      ImageBox
    },
    props: {
      info: {
        type: Object,
        default: () => {
          return {}
        }
      }
    },
    data() {
      return {
        isWm: "",
        isYht: ""
      }
    },
    computed: {
      ...mapGetters(["userInfo"]),
      getCompany(){
        this.isWm = wx.getStorageSync("isWm");
        if(this.isWm=="true"){
          return this.isWm=1;
        }
        return this.isWm=0;
        if(this.isYht=="true"){
          return this.isYht=1;
        }
        return this.isYht=0;
      }
    },
    watch: {},
    methods: {},
    mounted() {
    },
  }
</script>

